package com.interview.orderdetail.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.interview.orderdetail.entity.OrderDetail;
import com.interview.orderdetail.repository.OrderlistRepository;

@Service
public class OrderlistService {
	@Resource
	OrderlistRepository orderlistRepository;

	public List<OrderDetail> findAllOrderList() {
		return orderlistRepository.findAllOrderList();
	}

	public OrderDetail findOne(String id) {
		return orderlistRepository.findOneOrderList(id);
	}

	public OrderDetail save(OrderDetail orderlist) {
		return orderlistRepository.saveOrderList(orderlist);
	}

	public OrderDetail update(OrderDetail orderList) {
		return orderlistRepository.updateOrderList(orderList);
	}

	public void deleteOrderList(String id) {
		orderlistRepository.deleteOrderList(id);
	}
}
